import { request } from '../request'

// 分类列表
export const categoryList = () => {
  return request("category/list", "get")
}

// 基础列表
export const videoList = (params) => {
  return request("video/list", "get", null, params)
}

// 根据分类获取列表
export const videoCategory = (params) => {
  return request("video/category", "get", null, params)
}


// 获取分类列表
export const getCategoryList = () => {
  return request(`category/list`, "get");
};


// 发布视频
export const publishVideo = (data) => {
  return request(`video/publish`, "post", data);
};

// 搜索视频
export const searchVideo = (data) => {
  return request(`video/search`, "post", data);
};

// 点赞/取消点赞视频
export const likeVideo = (data) => {
  return request(`like/action`, "post", data);
};

// 收藏/取消收藏视频
export const collectVideo = (data) => {
  return request(`collect/action`, "post", data);
};

// 获取收藏列表
export const getCollectList = (params) => {
  return request(`collect/list`, "get", null, params);
};

// 关注/取消关注用户
export const followUser = (data) => {
  return request(`relation/action`, "post", data);
};

// 获取关注列表
export const getFollowList = (params) => {
  return request(`relation/follow`, "get", null, params);
};

// 获取用户信息
export const getUserInfo = () => {
  return request(`user/info`);
};